home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / act8 / 00109.ls < prev    next >
Encoding:
Text File  |  1995-03-28  |  1.9 KB  |  82 lines

  1. on showrightpath
  2.   global donelist, nextchan, lastClick, hordlink, TRIAL, nextclick
  3.   storepath()
  4.   set stunk to 2
  5.   if count(donelist) > 1 then
  6.     repeat with yyy = count(donelist) down to 1
  7.       if yyy < 11 then
  8.         puppetSound("untitled-" & yyy)
  9.       else
  10.         puppetSound("untitled-10")
  11.       end if
  12.       if getAt(donelist, yyy) > 11 then
  13.         if getAt(donelist, yyy) > 1 then
  14.           set the ink of sprite getAt(donelist, yyy) to 36
  15.         end if
  16.         updateStage()
  17.         mydelay(15)
  18.         next repeat
  19.       end if
  20.       set stunk to yyy + 2
  21.       exit repeat
  22.     end repeat
  23.   else
  24.     put "ooogah!"
  25.     set stunk to count(donelist) + 2
  26.   end if
  27.   set endhint to ((TRIAL - 2) * 2) + stunk
  28.   if endhint > 11 then
  29.     set endhint to 11
  30.   end if
  31.   if stunk < 2 then
  32.     set stunk to 2
  33.   end if
  34.   repeat with xxx = stunk to endhint
  35.     if xxx < 11 then
  36.       puppetSound("untitled-" & xxx)
  37.     else
  38.       puppetSound("untitled-10")
  39.     end if
  40.     set the ink of sprite xxx to 5
  41.     updateStage()
  42.     mydelay(15)
  43.   end repeat
  44.   startTimer()
  45.   repeat while the timer < 60
  46.     updateStage()
  47.   end repeat
  48.   restorepath()
  49.   set newlist to []
  50.   repeat with xxx = 1 to count(donelist)
  51.     if getAt(donelist, xxx) < 12 then
  52.       add(newlist, xxx + 1)
  53.       set the ink of sprite (xxx + 1) to 4
  54.       next repeat
  55.     end if
  56.     repeat with yyy = xxx to count(donelist)
  57.       set the ink of sprite getAt(donelist, yyy) to 36
  58.     end repeat
  59.     set nextchan to getAt(hordlink, xxx - 1)
  60.     set lastClick to xxx
  61.     set donelist to newlist
  62.     exit repeat
  63.   end repeat
  64.   set nextclick to count(donelist) + 1
  65.   updateStage()
  66. end
  67.  
  68. on storepath
  69.   global apathy
  70.   set apathy to []
  71.   repeat with xxx = 2 to 24
  72.     add(apathy, the ink of sprite xxx)
  73.   end repeat
  74. end
  75.  
  76. on restorepath
  77.   global apathy
  78.   repeat with xxx = 2 to 24
  79.     set the ink of sprite xxx to getAt(apathy, xxx - 1)
  80.   end repeat
  81. end
  82.